import React, { useEffect, useState } from 'react';
import { Form,Space,Tag,Checkbox } from "antd"
import DbSelect from "./components/DbSelect.jsx"
const data = {
  "total": 85,
  "status_code": 0,
  "status_msg": "请求成功！",
  "data": {
      "database_rule_list": [
         {
             "hxdts_name": "",
             "hxdts_detail": [
                 {
                     "source_db_name": "111",
                     "source_db_unit": "111",
                     "source_db_type": "111",
                     "flow_status": 0
                 },
                 {
                  "source_db_name": "222",
                  "source_db_unit": "222",
                  "source_db_type": "222",
                  "flow_status": 0
              }
             ]
         } 
      ]
  }
}

const App = () => {

  return (
    <Form>
      <Form.Item>
        {
          data.data.database_rule_list.map(item => {
            return (
              <Space>
                {
                  item.hxdts_detail.length >= 1 && (<Space>
                    <DbSelect data={item.hxdts_detail[0]}></DbSelect>
                    <DbSelect data={item.hxdts_detail[1]}></DbSelect>
                    
                  </Space>)
                }
              </Space>
            )
          })
        }
      </Form.Item>
    </Form>
  );
};

export default App;
